/**
 * 
 */
package wayic.http;

import java.net.URL;

/**
 * This contains the HTTP headers
 * 
 * @author Ashesh Nishant
 * 
 */
public interface ContentHeader {

    /**
     * compare getLastModified()== UNCHANGED to determine if the content loaded
     * has modified
     */
    long UNCHANGED            = 0l;
    long UNINITIALIZED        = -1;
    int  UNINITIALIZED_STATUS = -1;

    /**
     * Returns the source URL for the Content
     * 
     * @return
     */
    URL getUrl();

    /**
     * @return Returns the last modfied time in the HTTP header.
     */
    long getLastModified();

    /**
     * @return Returns the etag associated with an HTTP header.
     */
    String getEtag();

    /**
     * Status code returned in HTTP response.
     * 
     * @return int.
     */
    int getStatusCode();

    /**
     * @param lastModified
     *            Sets the last modfied time in the Http header.
     */
    void setLastModified(long lastModified);

    /**
     * @param etag
     *            Sets the etag associated with an HTTP header.
     * 
     */
    void setEtag(String etag);

    /**
     * Status code returned in HTTP response. void.
     */
    void setStatusCode(int status);

}
